package com.example.tasks

import kotlin.time.ExperimentalTime

@OptIn(ExperimentalTime::class)
fun main(args: Array<String>) {
    if (args.isEmpty()) return

    args.forEach {
        println(it)
    }

    when (args[0]) {
        "1" -> {
            pickupWithRegularExpression(args[1])
        }

        "2" -> {
            val keys2BeWrite = if (args.size == 3) emptyArray<String>() else args[3].split(",").toTypedArray().sortedArray()
            toJson(args[1], args[2])
        }

        "3" -> {
            parseExcel(args[1])
        }
    }
    println("task execute")
}
